\section{Fonctionnement}

%% CONVOLUTION
\subsection*{Convolution}
\begin{frame}[shrink]\frametitle{Convolution}

	\begin{columns}[T]
		\begin{column}{.4\textwidth}
			\begin{figure}
				\includegraphics[width=0.7\textwidth]{../images/convolution_2}
			\end{figure}
		\end{column}

		\begin{column}{.6\textwidth}
			\begin{block}{Définition}
				\begin{itemize}
					\item \{$x_1, x_2, ... , x_n$\}
					\item \{$w_1, w_2, ... , w_k$\}
					\item \{$y_1, y_2, ..., y_{n+1-k}$\}
					\item \{$y_i = w_1x_i + w_2x_{i+1} + ... + w_kx_{i+k-1}$\}
				\end{itemize}
			\end{block}
		\end{column}

	\end{columns}

	\vspace{0.8cm}
	\begin{center}
		\begin{minipage}{4.5cm}
			Soit, pour $k=3$ : \\
			$y_1 = w_1x_1 + w_2x_2 + w_3\color{red}{x_3}$\\
			$y_2 = w_1x_2 + w_2{\color{red}{x_3}} + w_3x_4$\\
			$y_3 = w_1{\color{red}{x_3}} + w_2x_4 + w_3x_5$\\
			$y_4 = w_1x_4 + w_2x_5 + w_3x_6$\\
			\ldots
		\end{minipage}
	\end{center}

\end{frame}

%% DESIGN B1
\subsection*{Design semi-systolique}
\begin{frame}{Design semi-systolique B1}
	\begin{figure}
		\includegraphics[scale=0.40]{../images/b1_3}
	\end{figure}

	\begin{center}
		\begin{tabular}{ | p{0.2cm} | p{1.2cm} | p{1.4cm} | p{2.4cm} | p{3.4cm} | p{0.5cm} | }
			\hline
				& {$X_{in}$, $Y_{in}$} & {w1} & {w2} & {w3} & {$Y_{out}$}\\
			\hline
			\only<1> { &&&&& \\ &&&&& \\ &&&&& \\ &&&&& }
			\only<2> % input 1
			{
				1 & $y_1$, $x_1$ & $y_1$ | {\color{red}{$x_1$}} & \ {\color{red}{$x_1$}} & \ {\color{red}{$x_1$}} &
			}
			\only<3,4,5,6,7,8,9> % calc 1
			{
				1 & $x_1$, $y_1$ &  $y_1 = w_1x_1$ &     &      &
			}
			\only<2,3> { \\ &&&&& \\ &&&&& \\ &&&&& }

			\only<4> % input 2
			{
				\\
				2 & $x_2$, $y_2$ & $y_2$ | {\color{red}{$x_2$}} & $y_1 = w_1x_1$ | {\color{red}{$x_2$}} & \ {\color{red}{$x_2$}} &
			}
			\only<5,6,7,8,9> % calc 2
			{
				\\
				2 & $x_2$, $y_2$ &  $y_2 = w_1x_2$ &  $y_1 = w_1x_1 + w_2x_2$   &      &
			}
			\only<4,5> { \\ &&&&& \\ &&&&& }
			\only<6> % input 3
			{
				\\
				3 & $x_3$, $y_3$ & $y_3$ | {\color{red}{$x_3$}}  &  $y_2 = w_1x_2$ | {\color{red}{$x_3$}} &   $y_1 = w_1x_1 + w_2x_2$ | {\color{red}{$x_3$}} &
			}
			\only<7,8,9> % calc 3
			{
				\\
				3 & $x_3$, $y_3$ & $y_3 = w_1x_3$  &  $y_2 = w_1x_2 + w_2x_3$ &   $y_1 = w_1x_1 + w_2x_2 + w_3x_3$ &
			}
			\only<6,7> { \\ &&&&& }
			\only<8> % input 4
			{
				\\
				4 & $x_4$, $y_4$ & $y_4$ | {\color{red}{$x_4$}}  &  $y_3 = w_1x_3$ | {\color{red}{$x_4$}} &  $y_2 = w_1x_2 + w_2x_3$ | {\color{red}{$x_4$}} & $y_1$
			}
			\only<9> % calc 4
			{
				\\
				4 & $x_4$, $y_4$ & $y_4 = w_1x_4$  &  $y_3 = w_1x_3 + w_2x_4$ &  $y_2 = w_1x_2 + w_2x_3 + w_3x_4$ & $y_1$
			}
			\\
			\hline
		\end{tabular}
	\end{center}
\end{frame}

\begin{frame}{Variante semi-systolique}
	\begin{figure}
		\includegraphics[width=0.7\textwidth]{../images/b2_2}
	\end{figure}

	\vspace{5mm}
	\begin{itemize}
		\item Utilisation du multiplicateur-accumulateur
		\item Bus moins large pour les $w_i$
		\item Bus séparé pour les résultats
	\end{itemize}
\end{frame}

\subsection*{Design systolique pur}
\begin{frame}{Variante systolique pure}
	\begin{figure}
		\includegraphics[width=0.6\textwidth]{../images/r1_2}
	\end{figure}

\begin{center}

		\begin{tabular}{ | p{0.2cm} | p{1.4cm} | p{1.4cm} | p{1.4cm} | p{1.4cm} | p{2cm} | }
			\hline
				& {$X_{in}$} & {y3} & {y2} & {y1} & {$W_{in}$}\\
			\hline
            \only<1> { &&&&& \\ &&&&& \\ &&&&& \\ &&&&& \\ &&&&& \\ &&&&& }
			\only<2>
			{
				1 & $x_2$ &  $x_2$ & - & $x_1$ | $w_1$ &  $w_1$ \\
			}
			\only<3,4,5,6,7,8> % calc 1
			{
				 1 & $x_2$ & -  &  - & $w_1x_1$ & $w_1$ \\
			}
			\only<2,3> { &&&&& \\ &&&&& \\ &&&&& \\ &&&&& \\ &&&&& }

			\only<4> % input 2
			{
				2 & $\rightarrow$ & -  & $w_1$ | $x_2$ & - &  $\leftarrow$
			}
			\only<5,6,7,8> % calc 2
			{
				2 & $\rightarrow$ &  - &  $w_1x_2$    &   -  & $\leftarrow$			
			}
			\only<4,5> { \\ &&&&& \\ &&&&& \\ &&&&& \\ &&&&& }
			\only<6> % input 3
			{
				\\
				3 & $x_3$ & $w_1$ | $x_3$  &  - &  $w_2$ | $x_2$   & $w_2$
			}
			\only<7,8> % calc 3
			{
				\\
				3 & $x_3$ & $w_1x_3$  & - &   $w_2x_2$ & $w_2$
			}
			\only<6,7> { \\ &&&&& \\ &&&&& \\ &&&&& }
			\only<8> % calc 3
			{
				\\
				4 & $\rightarrow$ &   	-		& $w_2x_3$ 	&    - 		& $\leftarrow$ \\
				5 & $x_4$          & $w_2x_4$ 	&		-	& $w_3x_3$	& $w_3$ \\
				6 & $\rightarrow$ &    -    	& $w_3x_4$ 	& 		-	& $\leftarrow$
			}
            \\
			\hline
		\end{tabular}
	\end{center}
\end{frame}
